/**
 * Alipay.com Inc.
 * Copyright (c) 2004-2011 All Rights Reserved.
 */
package com.alipay.supergw.common.dal.share_supergw.auto.ibatis;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;
import com.alipay.supergw.common.dal.share_supergw.auto.daointerface.DevRoutingDAO;
import com.alipay.supergw.common.dal.share_supergw.auto.dataobject.DevRoutingDO;
import java.util.List;
import org.springframework.dao.DataAccessException;
import java.util.Map;
import java.util.HashMap;

/**
 * An ibatis based implementation of dao interface <tt>com.alipay.supergw.common.dal.share_supergw.auto.daointerface.DevRoutingDAO</tt>.
 *
 * This file is generated by <tt>supergw-dalgen</tt>, a DAL (Data Access Layer)
 * code generation utility specially developed for <tt>supergw</tt> project.
 * 
 * PLEASE DO NOT MODIFY THIS FILE MANUALLY, or else your modification may
 * be OVERWRITTEN by someone else. To modify the file, you should go to 
 * directory <tt>(project-home)/dalgen</tt>, and 
 * find the corresponding configuration file (<tt>tables/sgw_dev_routing.xml</tt>). 
 * Modify the configuration file according to your needs, then run <tt>supergw-dalgen</tt> 
 * to generate this file.
 */
public class IbatisDevRoutingDAO extends SqlMapClientDaoSupport implements DevRoutingDAO {

    /**
     *  Query DB table <tt>sgw_dev_routing</tt> for records.
     *
     *  <p>
     *  Description for this operation is<br>
     *  <tt></tt>
     *  <p>
     *  The sql statement for this operation is <br>
     *  <tt>select trans_type_id, channel_system_id, client_domain_name, service_address, priority, memo, gmt_create, gmt_modified from sgw_dev_routing where ((trans_type_id = ?) AND (channel_system_id = ?) AND (client_domain_name = ?)) order by priority DESC</tt>
     *
     *	@param transTypeId
     *	@param channelSystemId
     *	@param clientDomainName
     *	@return List<DevRoutingDO>
     *	@throws DataAccessException
     */
    @SuppressWarnings({ "rawtypes", "unchecked" })
    public List<DevRoutingDO> loadByTrans(String transTypeId, String channelSystemId,
                                          String clientDomainName) throws DataAccessException {
        Map param = new HashMap();

        param.put("transTypeId", transTypeId);
        param.put("channelSystemId", channelSystemId);
        param.put("clientDomainName", clientDomainName);

        return getSqlMapClientTemplate().queryForList("MS-DEV-ROUTING-LOAD-BY-TRANS", param);

    }

}